package com.itheima.dao;

import com.itheima.pojo.Link;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

public interface LinkMapper extends Mapper<Link> {
    @Update("update t_link set sort = #{maxSort} where uid = #{uid}")
    void stick(@Param("uid")String uid,@Param("maxSort") String maxSort);

    @Select("SELECT Max(sort) FROM t_link")
    String getMaxSort();
}
